home *** CD-ROM | disk | FTP | other *** search
/ A.C.E. 2 / ACE CD 2.iso / FILES / UTILS / AMOSCOMP.DMS / in.adf / Versions.AMOS / Versions.amosSourceCode
Encoding:
AMOS Source Code  |  1993-02-25  |  1.7 KB  |  73 lines

  1. '------------------------------------------------------
  2. ' AMOS Versions displayer
  3. ' By Francois Lionet 
  4. ' AMOS (c) Europress Software 1990-1991
  5. '------------------------------------------------------
  6. ' This small program will explore all the AMOS files 
  7. ' and look for the version number within them. 
  8. '------------------------------------------------------
  9. '
  10. Dim F$(100)
  11. Set Dir 60
  12. '
  13. Screen Open 0,640,200,2,Hires : Colour 1,$FFF : Curs Off 
  14. '
  15. Centre At(,1)+"< AMOS Versions >"
  16. Print : Print 
  17. '
  18. F$=Fsel$("AMO**","","Please select your "+Pen$(3)+"AMOS"+Pen$(2),"interpretor...")
  19. If F$="" : Edit : End If 
  20. '
  21. F$(0)=F$
  22. '
  23. D$=":AMOS_System/"
  24. If Exist(D$)=0
  25.    D$=Fsel$("**","","Please choose any file within your ",Pen$(3)+"AMOS_System"+Pen$(2)+" folder...")
  26.    If D$="" : Edit : End If 
  27.    NAME[D$] : D$=Left$(D$,Param)
  28.    If Exist(D$)=0 : Edit : End If 
  29. End If 
  30. '  
  31. Print "Looking for the files..."
  32. F$=Dir First$(D$+"**")
  33. While F$<>""
  34.    If Left$(F$,1)=" "
  35.       F$=Left$(F$,50)-" "
  36.       Inc NF : F$(NF)=D$+F$
  37.    End If 
  38.    F$=Dir Next$
  39. Wend 
  40. '
  41. Reserve As Work 10,32*1024
  42. '
  43. Print 
  44. Print "Here are your current version numbers :"
  45. Print 
  46. '  
  47. For N=0 To NF
  48.    Fill Start(10) To Start(10)+Length(10),0
  49.    Open In 1,F$(N)
  50.    Sload 1 To Start(10),Length(10)
  51.    Close 
  52.    P=Hunt(Start(10) To Start(10)+Length(10),Chr$(0)+"$VER:")
  53.    If P
  54.       V$=""
  55.       For PP=P+6 To P+32
  56.          C=Peek(PP) : Exit If C=0
  57.          V$=V$+Chr$(C)
  58.       Next 
  59.       NAME[F$(N)] : N$=Mid$(F$(N),Param+1)
  60.       Print N$;String$(".",60-Len(N$));"V";V$
  61.    End If 
  62. Next 
  63. '
  64. Print 
  65. Print "Press any key..."
  66. Wait Key : Edit 
  67. '
  68. Procedure NAME[N$]
  69.    For C=Len(N$) To 1 Step -1
  70.       A$=Mid$(N$,C,1)
  71.       Exit If(A$="/") or(A$=":")
  72.    Next 
  73. End Proc[C]